﻿using System.Collections.Concurrent;

namespace HK.Core.Extend
{
    /// <summary>
    /// ConcurrentQueue扩展
    /// </summary>
    public static class ConcurrentQueueEx 
    {
        public static void Clear<T>(this ConcurrentQueue<T> iQueue)
        {
            do
            {
                // Do Nothing
            } 
            while (iQueue.TryDequeue(out var _));
        }
    }
}